3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
A drawing engine may support a texture mapping operation that determines how a drawing engine performs texture mapping. You specify an engine's texture mapping operation by assigning a value to its kQATag_TextureOp state variable. The default value of this variable for a drawing engine that supports texture mapping is kQATextureOp_None .
You can use the following masks to specify a texture mapping operation. The bits are ORed together to determine the desired operation.
#define kQATextureOp_None 0
#define kQATextureOp_Modulate (1 << 0)
#define kQATextureOp_Highlight (1 << 1)
#define kQATextureOp_Decal (1 << 2)
#define kQATextureOp_Shrink (1 << 3)
The clamping specified by the kQATextureOp_Shrink flag is not the same type of OpenGL texture clamping specified by the kQATagGL_TextureWrapU and kQATagGL_TextureWrapV state variables (see "Texture Wrapping Values" ). OpenGL clamping is designed to accept arbitrary uv values, while clamping specified by the kQATextureOp_Shrink flag operates only on uv values in the range 0.0 to 1.0. The kQATextureOp_Shrink clamping is therefore less expensive to implement (perhaps simply by compressing the range of u and v slightly before beginning interpolation). Any drawing engine that does support OpenGL clamping can use that code to support kQATextureOp_Shrink clamping.
Previous | QD3D Book | Overview | Chapter Contents | Next |